package com.banach.prema.service;

import com.banach.prema.dto.cmd.AlarmAdd;
import com.banach.prema.dto.cmd.AlarmUpd;
import com.banach.prema.dto.query.AlarmPageQuery;
import com.banach.prema.dto.query.MyAlarmPageQuery;
import com.banach.prema.dto.vo.AlarmVO;
import com.banach.prema.executor.AlarmDeleteExe;
import com.banach.prema.executor.AlarmPublishExe;
import com.banach.prema.executor.AlarmQueryExe;
import com.ego.framework.dto.Response;
import com.ego.framework.model.CustomizePage;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ajun
 * @Desc
 * @Date 2025/3/24 11:33
 */
@Service
public class AlarmService {

    @Resource
    private AlarmPublishExe alarmPublishExe;

    @Resource
    private AlarmDeleteExe alarmDeleteExe;

    @Resource
    private AlarmQueryExe alarmQueryExe;

    public Response<CustomizePage<AlarmVO>> selectPage(AlarmPageQuery pageQuery){
        return alarmQueryExe.selectPage(pageQuery);
    }
    public Response<CustomizePage<AlarmVO>> selectMyPage(MyAlarmPageQuery myAlarmPageQuery){
        return alarmQueryExe.selectMyPage(myAlarmPageQuery);
    }
    public Response publish(AlarmAdd alarmAdd){
        return alarmPublishExe.publish(alarmAdd);
    }

    public Response republish(AlarmUpd alarmUpd){
        return alarmPublishExe.republish(alarmUpd);
    }
    public Response delete(List<Long> ids){
        return alarmDeleteExe.delete(ids);
    }
}
